<template>
    <h3>组件事件</h3>
    <Child @someEvent="getHandle"/>
    <p>子组件传入的数据：{{message}}</p>
</template>

<script>
import Child from "./Child.vue";
export default {
    components: {
        Child
    },
    data() {
        return {
            message: ""
        }
    },
    methods: {
        getHandle(data) {
            console.log("触发了父组件的事件", data)
            this.message = data
        }
    }
}
</script>

<style scoped>

</style>